<% if @path.present? %>
  <%= link_caller.send link_method, @path, class: classes, active: @active, target: @target, data: @data, **@args do %>
    <%= helpers.svg @icon, class: "h-4 text-gray-700" if @icon.present? %>
    <%= @label %>
    <% if @target == :_blank %>
      <%= helpers.svg('heroicons/outline/external-link', class: 'self-center ml-auto h-3 mr-2') %>
    <% end %>
  <% end %>
<% else %>
  <%= content_tag :div, class: classes, active: @active, target: @target, data: @data do %>
    <%= helpers.svg @icon, class: "h-4 text-gray-700" if @icon.present? %>
    <%= @label %>
  <% end %>
<% end %>
